Skip to content

Story labels: one sheet for tags, people, map and stickers; tag colors; share text from the editor - #751

Merged
theachoem merged 4 commits into
developfrom
story-labels-sheet
Nov 17, 2026
Merged

theachoem merged 4 commits into
developfrom
story-labels-sheet

Conversation

@theachoem

@theachoem theachoem commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Problem

  • Tags, people, place and stickers were each edited in a different floating picker or full-screen page.
  • Tags had no color.
  • Adding a place meant opening the map and tapping Save, which waited for the place name (stuck offline), and dragging the map on a story you were only reading changed its place.
  • Sharing a story as Text/Markdown, and the Markdown export, went through Quill, losing headings, strikethrough, inline code and dates.
  • Two checklists (or lists) an empty line apart came out as one list when shared as Markdown or exported, and the story tile showed their checkboxes as bullets.

Solution

  • Story labels sheet: one sheet with Tags, People, Map and Stickers tabs, opened on the tapped label's tab
    • Tags/People/Stickers share one tag list; each toggle saves right away, in tap order
    • Editing a tag opens a sheet on top, not a whole page
    • Map tab replaces the map picker: drag under a center pin, past places as dots, my location, ⋮ (remove, style, open in maps app)
    • From a story's read-only view, the Map tab is view-only: the place is a pin fixed to its spot, the map moves freely, Edit to change it (Cancel goes back)
    • Reset (editor) and Cancel sit alone at the top left, with a label
    • Place name sheet: name the spot, or find one of your places by name or typed coordinates (local only, no paid API)
    • Opening an older story never enables Save on its own
    • Stories map: tapping a cluster zooms in until it splits
  • One-tap place: the pin on a story dated today adds where you are, no map
    • Instant from a recent last known position; a fresher fix and the name fill in quietly ("Current location" meanwhile, no spinner)
    • Another day, or no position: opens the Map tab. A story started from the stories map uses the same path
    • Nothing waits on the geocoder: Save works offline, a place saved without a name gets it later (only if unchanged meanwhile)
    • Name lookups shared per spot in memory (PlaceDetailsService), failures retried later
  • Tag colors: 9 colors that look different as chips
    • Picked inline below the title on the edit tag page; tap the selected color again to clear it
    • Shown as the story label chip's background, and as a dot after the title in tag lists
    • Only the seed is stored (TagDbModel.colorSeedValue, nullable, no migration); TagColorService derives the colors per brightness
  • Share story text straight from the editor document (StoryPlainTextExporter), keeping list markers, tasks, headings, strikethrough and inline code
  • Markdown export writes each page's stored Markdown, not a Quill round trip
    • Embeds keep their stored HTML tags (img, video, audio, album, time), with asset paths made relative to the export
    • Legacy Quill pages that don't convert losslessly fall back to the old flattening
  • Lists an empty line apart stay apart
    • One rule for what goes between blocks (MarkdownFormat.blockSeparator in the editor package), used by the stored Markdown, the export and the share text: list items on one newline, but a blank line when an empty line (or embed) was left out between them
    • Export leaves empty lines out through the writer (encode(..., dropEmptyParagraphs: true)), so it knows where they were
    • Story tile: flutter_markdown_plus shows a task in a loose list as a bullet, so SpMarkdownBody.withoutLooseLists splits such lists before rendering (also fixes stories saved before this; ~0.4 µs when there's no blank line)
  • Skipping the title: Enter on an empty title (any empty heading) turns it into a plain line instead of leaving an empty title above the body
    • That line shows a "Body..." placeholder while editing ("..." in the read view)
  • Fix: on iOS, an edited tag's prefilled title no longer fails "required"
  • Removed: floating pickers, map picker, edit place and manual input screens, unused MapTiler geocoder
  • Translations: new strings in all 20 locales, unused ones removed

Testing

  • dart analyze clean, flutter test passes (app 1120, editor package 11095)
  • Map tab on Android Google Maps: dragging the map doesn't drag the sheet
  • Landscape iPhone and macOS insets
  • One-tap pin on a story dated today: chip appears at once, then the name; in airplane mode the coordinates are saved; another day or location denied opens the Map tab
  • Map tab from a read-only story: drag/zoom never enables Save; Edit → move → Save, and Edit → Cancel; on Google Maps the fixed pin lines up with the center pin
  • Map tab in the editor: Reset fades in top left after a drag; Save works right away offline
  • Tag colors in light and dark; edit a tag from the labels sheet; backup restore keeps the color
  • New story: Enter on "Title..." shows "Body..." on the same line; a typed title + Enter still starts the body below
  • Share as Text and Markdown with lists, tasks and headings
  • Two tasks an empty line apart: Share as Markdown and the Markdown export keep a blank line between them (no  ); the story tile shows two checkboxes, not bullets; consecutive tasks stay one list
  • Export to Markdown: headings, dates and photos/videos open from the exported files

Screenshots

image image image

🤖 Generated with Claude Code

@theachoem theachoem added the enhancement New feature or request label Nov 8, 2026
@theachoem theachoem self-assigned this Nov 8, 2026
@theachoem theachoem linked an issue Nov 8, 2026 that may be closed by this pull request
@theachoem theachoem moved this to Done in StoryPad Nov 8, 2026
@theachoem theachoem changed the title Story labels: one sheet for tags, people, map and stickers Story labels: one sheet for tags, people, map and stickers; tag colors Nov 8, 2026
@theachoem theachoem linked an issue Nov 8, 2026 that may be closed by this pull request
@theachoem
theachoem requested a balanced review from Copilot November 8, 2026 21:14
@theachoem theachoem changed the title Story labels: one sheet for tags, people, map and stickers; tag colors Story labels: one sheet for tags, people, map and stickers; tag colors; share text from the editor Nov 8, 2026
@theachoem

theachoem commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner Author

I will be testing this UX for a few days before merging.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved findings affect map gestures, desktop scrolling, sticker selection and accessibility, Markdown export fidelity, and saved-place lookup and distance calculations.

11 open issues
2 files not reviewed
  • lib/core/databases/models/tag_db_model.g.dart: Generated file
  • lib/objectbox.g.dart: Generated file
What changed in this PR

This PR consolidates StoryPad’s label editing into one tabbed bottom sheet and adds optional tag colors, with supporting map, persistence, localization, and test changes.

Changes:

  • Unifies Tags, People, Map, and Stickers workflows, replacing separate pickers and place-editing screens.
  • Adds stored tag colors, adaptive color indicators, and shared map and sheet components.
  • Updates text/Markdown sharing, translations, and regression coverage.
File Description
translations/​zh-CN.json Updates Simplified Chinese strings and removes obsolete keys.
translations/​vi-VN.json Updates Vietnamese strings and removes obsolete keys.
translations/​tr.json Updates Turkish strings and removes obsolete keys.
translations/​ru-RU.json Updates Russian strings and removes obsolete keys.
translations/​pt-BR.json Updates Brazilian Portuguese strings and removes obsolete keys.
translations/​ko-KR.json Updates Korean strings and removes obsolete keys.
translations/​it-IT.json Updates Italian strings and removes obsolete keys.
translations/​id.json Updates Indonesian strings and removes obsolete keys.
translations/​fr-FR.json Updates French strings and removes obsolete keys.
translations/​es-ES.json Updates European Spanish strings and removes obsolete keys.
translations/​es-419.json Updates Latin American Spanish strings and removes obsolete keys.
translations/​en.json Adds English labels and search guidance; removes obsolete keys.
translations/​de-DE.json Updates German strings and removes obsolete keys.
translations/​ar.json Updates Arabic strings and removes obsolete keys.
test/​widgets/​sp_text_inputs_page_test.dart Tests trailing-widget sizing and prefilled validation.
test/​widgets/​maps/​sp_map_dot_marker_test.dart Tests marker colors and style-specific cache keys.
test/​widgets/​bottom_sheets/​sp_place_name_sheet_test.dart Tests place grouping, ordering, and distance formatting.
test/​core/​services/​tag_color_service_test.dart Tests color caching, brightness adaptation, and contrast.
test/​core/​services/​story_plain_text_exporter_test.dart Tests plain-text and Markdown exports.
test/​core/​services/​map/​place_selection_service_test.dart Tests place-detail merging and change detection.
test/​core/​objects/​sp_latlng_test.dart Tests geographic distances and boundary cases.
test/​core/​databases/​models/​tag_db_model_test.dart Tests color serialization and legacy compatibility.
test/​core/​databases/​models/​place_db_model_test.dart Tests area labels and coordinate fallbacks.
pubspec.yaml Increments the build number.
lib/​widgets/​sp_text_inputs_page.dart Adds trailing widgets and fixes prefilled Cupertino validation.
lib/​widgets/​sp_tag_title.dart Adds tag titles with optional color dots.
lib/​widgets/​sp_icons.dart Adds map-layer and external-opening icons.
lib/​widgets/​sp_filled_button.dart Adds an adaptive filled button.
lib/​widgets/​sp_adaptive_pop_up_button.dart Adds horizontal popup alignment.
lib/​widgets/​maps/​sp_map_dot_marker.dart Adds style-aware saved-place markers.
lib/​widgets/​maps/​sp_map_center_pin.dart Adds an animated center pin.
lib/​widgets/​maps/​sp_google_maps_flutter.dart Adds eager gestures and cluster-tap fallback handling.
lib/​widgets/​maps/​sp_flutter_map.dart Fits cluster bounds when taps are not otherwise handled.
lib/​widgets/​maps/​map_types.dart Defines the handled/unhandled cluster-tap contract.
lib/​widgets/​bottom_sheets/​story_labels/​tags_tab.dart Adds searchable tag/person selection, creation, and management.
lib/​widgets/​bottom_sheets/​story_labels/​stickers_tab.dart Adds categorized sticker selection and custom picks.
lib/​widgets/​bottom_sheets/​story_labels/​place_lookup.dart Centralizes initial camera, place-detail, and saved-dot lookups.
lib/​widgets/​bottom_sheets/​story_labels/​custom_emoji_sheet.dart Adds the nested full emoji picker.
lib/​widgets/​bottom_sheets/​sp_stories_bottom_sheet.dart Delegates external map opening to a shared service.
lib/​widgets/​bottom_sheets/​sp_share_story_bottom_sheet.dart Exports editor documents directly and simplifies option switching.
lib/​widgets/​bottom_sheets/​base_bottom_sheet.dart Adds edge-to-edge layout and fixed content sizing.
lib/​views/​tags/​tags_view.dart Imports the shared colored tag-title widget.
lib/​views/​tags/​tags_content.dart Displays tag titles with color indicators.
lib/​views/​tags/​edit/​edit_tag_view.dart Adds color to edit results and imports picker components.
lib/​views/​tags/​edit/​edit_tag_view_model.dart Tracks selected colors and clearing behavior.
lib/​views/​tags/​edit/​edit_tag_content.dart Adds the color picker beside the title field.
lib/​views/​stories/​local_widgets/​story_header.dart Removes the separate current-location callback.
lib/​views/​stories/​local_widgets/​base_story_view_model.dart Removes the shared current-location action.
lib/​views/​stories/​edit/​edit_story_view_model.dart Retains current-location capture for new-story flows.
lib/​views/​map/​picker/​map_picker_view.dart Removes the standalone map-picker view and result types.
lib/​views/​map/​map_view_model.dart Chooses cluster zooming versus listing colocated stories.
lib/​views/​map/​manual_input/​map_picker_manual_input_view.dart Removes the standalone coordinate-input route.
lib/​views/​map/​manual_input/​map_picker_manual_input_view_model.dart Removes the old coordinate-resolution view model.
lib/​views/​map/​manual_input/​map_picker_manual_input_content.dart Removes the old coordinate-input UI and preview.
lib/​views/​map/​edit_place/​edit_place_view.dart Removes the standalone place-name route.
lib/​views/​map/​edit_place/​edit_place_view_model.dart Removes the old place-name editing state.
lib/​views/​map/​edit_place/​edit_place_content.dart Removes the old place-name editing UI.
lib/​providers/​tags_provider.dart Persists selected colors when creating or editing tags.
lib/​objectbox.g.dart Adds generated color-property storage bindings.
lib/​objectbox-model.json Registers the nullable tag-color property.
lib/​core/​services/​tag_color_service.dart Derives and caches brightness-aware tag colors.
lib/​core/​services/​story_plain_text_exporter.dart Converts editor document nodes into shareable text or Markdown.
lib/​core/​services/​map/​place_selection_service.dart Adds pure place-selection and detail-merging rules.
lib/​core/​services/​map/​map_app_opener_service.dart Centralizes Apple Maps and Google Maps opening.
lib/​core/​services/​map/​initial_map_camera_resolver.dart Updates a comment to reference the Map tab.
lib/​core/​services/​location/​sp_location_service.dart Updates documentation for the replacement Map-tab workflow.
lib/​core/​services/​geocoding/​sp_geocoding_service.dart Adds named-place lookup filtering and removes an unused instance.
lib/​core/​services/​geocoding/​maptiler/​sp_maptiler_geocoding_service.dart Removes the unused MapTiler geocoder.
lib/​core/​objects/​sp_latlng.dart Adds great-circle distance calculation.
lib/​core/​mixins/​debounched_callback.dart Restricts keyed timer lookup to that key.
lib/​core/​databases/​models/​tag_db_model.g.dart Adds generated color copying and JSON serialization.
lib/​core/​databases/​models/​tag_db_model.dart Adds the optional color seed and color accessor.
lib/​core/​databases/​models/​place_db_model.dart Adds area labels with coordinate fallbacks.
lib/​core/​databases/​adapters/​objectbox/​stories_box.dart Adds distinct named-place retrieval.
lib/​core/​databases/​adapters/​objectbox/​helpers/​tags_box_transformer.dart Transfers color seeds between models and storage entities.
lib/​core/​databases/​adapters/​objectbox/​entities.dart Adds color storage to the tag entity.

Review effort: Balanced

Comment thread lib/core/objects/sp_latlng.dart Resolved
Comment thread lib/widgets/maps/sp_map_center_pin.dart Resolved
@theachoem
theachoem force-pushed the story-labels-sheet branch 3 times, most recently from 42f77c0 to b7920d3 Compare November 9, 2026 15:16
@theachoem
theachoem requested a balanced review from Copilot November 9, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theachoem

Copy link
Copy Markdown
Owner Author

UX is approved; time to review the code.

@theachoem theachoem moved this from Done to In Progress in StoryPad Nov 16, 2026
…eholder

Enter on an empty heading (the title, or any empty heading) turns it into a plain line instead
of leaving an empty title above the body. That line shows "Body..." while editing ("..." in the
read view).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theachoem
theachoem requested a balanced review from Copilot November 16, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical race allows background place updates to overwrite newer story edits or place removals by writing back a stale snapshot without atomic checks or serialization.

4 open issues
3 resolved since last review
2 files not reviewed
  • lib/core/databases/models/tag_db_model.g.dart: Generated file
  • lib/objectbox.g.dart: Generated file

Review effort: Balanced

Comment thread lib/widgets/sp_markdown_body.dart Resolved
theachoem and others added 3 commits November 17, 2026 23:32
…ne apart stay apart

- Share as Text/Markdown comes straight from the editor document (StoryPlainTextExporter),
  keeping list markers, tasks, headings, strikethrough and inline code, without Quill.
- Markdown export writes each page's stored Markdown; embeds keep their HTML tags with asset
  paths made relative to the export. Legacy Quill pages that don't convert losslessly fall back
  to the old flattening.
- One rule for what goes between blocks (MarkdownFormat.blockSeparator): list items on one
  newline, a blank line where an empty line was left out between them. The stored format is
  unchanged (only share/export drop empty lines).
- Story tile: SpMarkdownBody.withoutLooseLists splits loose lists so tasks show checkboxes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 9 colors that look different as chips, picked inline below the title on the edit tag page;
  tap the selected color again to clear it.
- Shown as the story label chip's background, and as a dot after the title in tag lists.
- Only the seed is stored (TagDbModel.colorSeedValue, nullable, no migration); TagColorService
  derives the colors per brightness.
- The edit tag form can open as a sheet (SpEditTagSheet), for when it's opened from a sheet.
- Fix: on iOS, an edited tag's prefilled title no longer fails "required".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lace

- Story labels sheet with Tags, People, Map and Stickers tabs, opened on the tapped label's tab.
  Each toggle saves right away, in tap order; editing a tag opens a sheet on top.
- Map tab replaces the map picker: drag under a center pin, past places as dots, my location,
  menu (remove, style, open in maps app). From a read-only story it's view-only until Edit.
- Place name sheet: name the spot, or find one of your places by name or typed coordinates
  (local only, no paid API).
- One-tap place: the pin on a story dated today adds where you are, no map. Near one of your
  named places (~75m), that place itself is reused, its spot and name, as tapping its dot does;
  local, so offline too. A fresher fix and the details fill in quietly.
- Nothing waits on the geocoder: Save works offline; a place saved without a name gets it later,
  written into the saved story (re-read first), never over a copy edited elsewhere or binned.
  Your own place names show at once, before the geocoder answers.
- Stories map: tapping a cluster zooms in until it splits.
- Removed: floating pickers, map picker, edit place and manual input screens, MapTiler geocoder.
- Translations: new strings in all 20 locales, unused ones removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theachoem
theachoem merged commit 585ae95 into develop Nov 17, 2026
1 check passed
@theachoem
theachoem deleted the story-labels-sheet branch November 17, 2026 16:38
@github-project-automation github-project-automation Bot moved this from In Progress to Done in StoryPad Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Make the tags popup a little taller? [Feature]Colour for Tags

2 participants